home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Utilities Experience
/
The Utilities Experience - Volume 1.iso
/
software
/
misc
/
a-d
/
3.0iupdate
/
macros.lha
/
cmdshell.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-06-12
|
943b
|
56 lines
/* $VER: Command Shell 1.1 (12.06.95) */
options results
options failat 100
open('console', 'CON:0/11/640/100/PageStream3/SCREEN PageStream3', 'RW')
writeln('console', 'Enter commands, "Q" to exit.')
address 'PAGESTREAM'
/* loop until user exits */
do forever
/* get command string from user */
writech('console','CMD> ')
cmd=readln('console')
select
/* time to quit? */
when (upper(cmd) = "Q") then do
leave
end
/* need some help? */
when (cmd = "?") then do
writeln('console', 'Enter "Q" to exit.')
end
/* do nothing on empty lines */
when (cmd = "") then do
nop
end
/* process the line */
otherwise do
/* execute the command string */
cmd
/* if ok show the result, if any */
if (RC = 0) then do
if result ~= "RESULT" then writeln('console', result)
if (upper(cmd) = "QUIT") then leave
end
else do
writeln('console', '*** Error');
end
end
end
end
exit(0)